<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 组件的模板分离式写法 x-template的写法-->
    <div id="app">
        <my-cpn></my-cpn>
    </div>
    <script src="../js/vue.js"></script>
    <script type="text/x-template" id="myCpn">
        <div>
            <div>
                我是一个模板分离式写法创建的组件
            </div>
            <div>
                type方式为x-templatesss
            </div>
        </div>
    </script>
    <script>
        const app = new Vue({
            el:'#app',
            data(){
                return {

                }
            },
            components:{
                'my-cpn':{
                    template:'#myCpn'
                }
            }
        })
    </script>
</body>
</html>